<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>bn::fixed_t class | Butano Docs</title>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
  <link rel="icon" href="favicon-dark.png" type="image/png" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="theme-color" content="#22272e" />
</head>
<body>
<header><nav id="navigation">
  <div class="m-container">
    <div class="m-row">
      <span id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">
        <a href="https://github.com/GValiente/butano">Butano</a> <span class="m-breadcrumb">|</span> <a href="index.html" class="m-thin">Docs</a>
      </span>
      <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
          <path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
        </svg></a>
        <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
        <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
      </div>
      <div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
        <div class="m-row">
          <ol class="m-col-t-6 m-col-m-none">
            <li><a href="pages.html">Pages</a></li>
            <li><a href="modules.html">Modules</a></li>
          </ol>
          <ol class="m-col-t-6 m-col-m-none" start="3">
            <li><a href="namespaces.html">Namespaces</a></li>
            <li><a href="annotated.html">Classes</a></li>
            <li><a href="files.html">Files</a></li>
            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
              <use href="#m-doc-search-icon-path" />
            </svg></a></li>
          </ol>
        </div>
      </div>
    </div>
  </div>
</nav></header>
<main><article>
  <div class="m-container m-container-inflatable">
    <div class="m-row">
      <div class="m-col-l-10 m-push-l-1">
        <h1>
          <div class="m-doc-include m-code m-inverted m-right-m m-text-right"><span class="cp">#include</span> <a class="cpf" href="bn__fixed_8h.html">&lt;bn_fixed.h&gt;</a></div>
          <div class="m-doc-template">template&lt;int Precision&gt;</div>
          <span class="m-breadcrumb"><a href="namespacebn.html">bn</a>::<wbr/></span>fixed_t <span class="m-thin">class</span>
        </h1>
        <p>Poor man&#x27;s float.</p>
        <table class="m-table m-fullwidth m-flat">
          <thead>
            <tr><th colspan="2">Template parameters</th></tr>
          </thead>
          <tbody>
            <tr>
              <td style="width: 1%">Precision</td>
              <td>Number of bits used for the fractional part.</td>
            </tr>
          </tbody>
        </table>
        <nav class="m-block m-default">
          <h3>Contents</h3>
          <ul>
            <li>
              Reference
              <ul>
                <li><a href="#pub-static-methods">Public static functions</a></li>
                <li><a href="#typeless-methods">Constructors, destructors, conversion operators</a></li>
                <li><a href="#pub-methods">Public functions</a></li>
                <li><a href="#friends">Friends</a></li>
              </ul>
            </li>
          </ul>
        </nav>
<p>It fakes numbers with decimal points with integers.</p>
        <section id="pub-static-methods">
          <h2><a href="#pub-static-methods">Public static functions</a></h2>
          <dl class="m-doc">
            <dt>
              <span class="m-doc-wrap-bumper">static auto <a href="#ab50c994ef14f1b537cd1f3f22dbb88b6" class="m-doc">from_data</a>(</span><span class="m-doc-wrap">int data) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> with the given internal data.</dd>
            <dt id="a09247a481d5b644a4f35c2191c91018d">
              <span class="m-doc-wrap-bumper">static auto <a href="#a09247a481d5b644a4f35c2191c91018d" class="m-doc-self">precision</a>(</span><span class="m-doc-wrap">) -&gt; int <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the number of bits used for the fractional part.</dd>
            <dt id="a2d7ad263ffd915922e44df85442368a0">
              <span class="m-doc-wrap-bumper">static auto <a href="#a2d7ad263ffd915922e44df85442368a0" class="m-doc-self">scale</a>(</span><span class="m-doc-wrap">) -&gt; int <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the internal data of fixed_t&lt;Precision&gt;(1);.</dd>
            <dt id="a87162e66f009ddf04b62594376ada165">
              <span class="m-doc-wrap-bumper">static auto <a href="#a87162e66f009ddf04b62594376ada165" class="m-doc-self">half_scale</a>(</span><span class="m-doc-wrap">) -&gt; int <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the internal data of <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision / 2&gt;(1);.</dd>
          </dl>
        </section>
        <section id="typeless-methods">
          <h2><a href="#typeless-methods">Constructors, destructors, conversion operators</a></h2>
          <dl class="m-doc">
            <dt id="a3eeca0aec7986dc1b1c15a73e6f16b75">
              <span class="m-doc-wrap-bumper"><a href="#a3eeca0aec7986dc1b1c15a73e6f16b75" class="m-doc-self">fixed_t</a>(</span><span class="m-doc-wrap">) <span class="m-label m-flat m-info">defaulted</span> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Default constructor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper"><a href="#acc68511f7a1cfdc1e679eed89074c9af" class="m-doc">fixed_t</a>(</span><span class="m-doc-wrap">int value) <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Constructor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper"><a href="#a168c31dad89d76d702341505d7a918e6" class="m-doc">fixed_t</a>(</span><span class="m-doc-wrap">unsigned value) <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Constructor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper"><a href="#ad0b88c27363175230fb4d79ea90bac45" class="m-doc">fixed_t</a>(</span><span class="m-doc-wrap">float value) <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Constructor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper"><a href="#a02730b92c60524367d1467efb245199e" class="m-doc">fixed_t</a>(</span><span class="m-doc-wrap">double value) <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Constructor.</dd>
            <dt>
              <div class="m-doc-template">template&lt;int OtherPrecision&gt;</div>
              <span class="m-doc-wrap-bumper"><a href="#af6e2d457d8fb0390e1b825776be49021" class="m-doc">fixed_t</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;OtherPrecision&gt; other) <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Constructor.</dd>
            <dt id="a070b9c6669a293036caa8eb9dbe608a6">
              <span class="m-doc-wrap-bumper"><a href="#a070b9c6669a293036caa8eb9dbe608a6" class="m-doc-self">operator int</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-flat m-info">explicit</span>  <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the integer part using a division.</dd>
            <dt id="a3c1b825938fee573ca0acdb86695e940">
              <span class="m-doc-wrap-bumper"><a href="#a3c1b825938fee573ca0acdb86695e940" class="m-doc-self">operator float</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-flat m-info">explicit</span>  <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the nearest single precision floating point value.</dd>
            <dt id="a8aa247bc29532a6d117278025c2668b2">
              <span class="m-doc-wrap-bumper"><a href="#a8aa247bc29532a6d117278025c2668b2" class="m-doc-self">operator double</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-flat m-info">explicit</span>  <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the nearest double precision floating point value.</dd>
          </dl>
        </section>
        <section id="pub-methods">
          <h2><a href="#pub-methods">Public functions</a></h2>
          <dl class="m-doc">
            <dt id="a376eb52b019789a7321f890618cb0272">
              <span class="m-doc-wrap-bumper">auto <a href="#a376eb52b019789a7321f890618cb0272" class="m-doc-self">data</a>(</span><span class="m-doc-wrap">) const -&gt; int <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the internal data.</dd>
            <dt id="a7a067c5265df9c4dae8782d1b3604027">
              <span class="m-doc-wrap-bumper">auto <a href="#a7a067c5265df9c4dae8782d1b3604027" class="m-doc-self">integer</a>(</span><span class="m-doc-wrap">) const -&gt; int <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the integer part using a division.</dd>
            <dt id="aefdd40656c22ef601f0066c57e19eb0b">
              <span class="m-doc-wrap-bumper">auto <a href="#aefdd40656c22ef601f0066c57e19eb0b" class="m-doc-self">shift_integer</a>(</span><span class="m-doc-wrap">) const -&gt; int <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the integer part using a right shift.</dd>
            <dt id="a0d7724f715a8566bf69237319115750b">
              <span class="m-doc-wrap-bumper">auto <a href="#a0d7724f715a8566bf69237319115750b" class="m-doc-self">right_shift_integer</a>(</span><span class="m-doc-wrap">) const -&gt; int <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the integer part using a right shift.</dd>
            <dt id="a55384c5c6801ffeff0096c105473c811">
              <span class="m-doc-wrap-bumper">auto <a href="#a55384c5c6801ffeff0096c105473c811" class="m-doc-self">unsigned_integer</a>(</span><span class="m-doc-wrap">) const -&gt; unsigned <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the integer part, assuming that it is &gt;= 0.</dd>
            <dt id="a4835abe5bdce3df342f618ae76e95a71">
              <span class="m-doc-wrap-bumper">auto <a href="#a4835abe5bdce3df342f618ae76e95a71" class="m-doc-self">round_integer</a>(</span><span class="m-doc-wrap">) const -&gt; int <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the nearest integer value.</dd>
            <dt id="aa49a0c591512a021d7afc4f6917d7b95">
              <span class="m-doc-wrap-bumper">auto <a href="#aa49a0c591512a021d7afc4f6917d7b95" class="m-doc-self">floor_integer</a>(</span><span class="m-doc-wrap">) const -&gt; int <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the largest integer value not greater than this value.</dd>
            <dt id="a882e785fc0beeac0c9ce6d4421f7b1a1">
              <span class="m-doc-wrap-bumper">auto <a href="#a882e785fc0beeac0c9ce6d4421f7b1a1" class="m-doc-self">ceil_integer</a>(</span><span class="m-doc-wrap">) const -&gt; int <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the smallest integer value not less than this value.</dd>
            <dt id="acdae09807af4e680287e19884acd85a8">
              <span class="m-doc-wrap-bumper">auto <a href="#acdae09807af4e680287e19884acd85a8" class="m-doc-self">fraction</a>(</span><span class="m-doc-wrap">) const -&gt; int <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the fractional part.</dd>
            <dt id="a46d9b340da37b1b5654ba82d223f4849">
              <span class="m-doc-wrap-bumper">auto <a href="#a46d9b340da37b1b5654ba82d223f4849" class="m-doc-self">to_float</a>(</span><span class="m-doc-wrap">) const -&gt; float <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the nearest single precision floating point value.</dd>
            <dt id="accfe483ec6c76f08a04593681536cd66">
              <span class="m-doc-wrap-bumper">auto <a href="#accfe483ec6c76f08a04593681536cd66" class="m-doc-self">to_double</a>(</span><span class="m-doc-wrap">) const -&gt; double <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the nearest double precision floating point value.</dd>
            <dt id="a636d26d5956369b2d92a7f1f9be4da2c">
              <span class="m-doc-wrap-bumper">auto <a href="#a636d26d5956369b2d92a7f1f9be4da2c" class="m-doc-self">multiplication</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this value by the given integer value.</dd>
            <dt id="a05029ce0d8b7a5ff7f5028035f45522e">
              <span class="m-doc-wrap-bumper">auto <a href="#a05029ce0d8b7a5ff7f5028035f45522e" class="m-doc-self">multiplication</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this value by the given fixed point value, using half precision to try to avoid overflow.</dd>
            <dt id="ac08d8ecdb3da9d247188b2ced1244e0e">
              <span class="m-doc-wrap-bumper">auto <a href="#ac08d8ecdb3da9d247188b2ced1244e0e" class="m-doc-self">shift_multiplication</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this value by the given integer value.</dd>
            <dt id="a89db6d0ea2016fc420f74966b641d338">
              <span class="m-doc-wrap-bumper">auto <a href="#a89db6d0ea2016fc420f74966b641d338" class="m-doc-self">shift_multiplication</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this value by the given fixed point value, using half precision to try to avoid overflow and right shifts instead of divisions for the precision handling.</dd>
            <dt id="a46dcc7435abfc718c96269f84967a2cf">
              <span class="m-doc-wrap-bumper">auto <a href="#a46dcc7435abfc718c96269f84967a2cf" class="m-doc-self">safe_multiplication</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this value by the given integer value.</dd>
            <dt id="ae4eb6711cbbff61d9277075838cfe9b1">
              <span class="m-doc-wrap-bumper">auto <a href="#ae4eb6711cbbff61d9277075838cfe9b1" class="m-doc-self">safe_multiplication</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this value by the given fixed point value, casting them to int64_t to try to avoid overflow.</dd>
            <dt id="aec51e295411d5905b7f17ac2a1b7d5f9">
              <span class="m-doc-wrap-bumper">auto <a href="#aec51e295411d5905b7f17ac2a1b7d5f9" class="m-doc-self">unsafe_multiplication</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this value by the given integer value.</dd>
            <dt id="a9bd3130aae11e2dc8c06d16070496a0a">
              <span class="m-doc-wrap-bumper">auto <a href="#a9bd3130aae11e2dc8c06d16070496a0a" class="m-doc-self">unsafe_multiplication</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this value by the given fixed point value without trying to avoid overflow.</dd>
            <dt id="aab70d33814ea7325336c8a7c977ea893">
              <span class="m-doc-wrap-bumper">auto <a href="#aab70d33814ea7325336c8a7c977ea893" class="m-doc-self">unsafe_shift_multiplication</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this value by the given integer value.</dd>
            <dt id="aff0c280ae6f95977d26c123641b90e15">
              <span class="m-doc-wrap-bumper">auto <a href="#aff0c280ae6f95977d26c123641b90e15" class="m-doc-self">unsafe_shift_multiplication</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this value by the given fixed point value without trying to avoid overflow, using a right shift instead of a division for the precision handling.</dd>
            <dt id="ac4aa344a4083225b8a2664df930f03e8">
              <span class="m-doc-wrap-bumper">auto <a href="#ac4aa344a4083225b8a2664df930f03e8" class="m-doc-self">division</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this value by the given integer value.</dd>
            <dt id="a8471af742b118ca018332c1023104c5e">
              <span class="m-doc-wrap-bumper">auto <a href="#a8471af742b118ca018332c1023104c5e" class="m-doc-self">division</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this value by the given fixed point value, using half precision to try to avoid overflow.</dd>
            <dt id="a94cd60cb5a22656bbac78b411c5fbafa">
              <span class="m-doc-wrap-bumper">auto <a href="#a94cd60cb5a22656bbac78b411c5fbafa" class="m-doc-self">shift_division</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this value by the given integer value.</dd>
            <dt id="acfe3cd5d9f59f19ab8a50d0f1f47167c">
              <span class="m-doc-wrap-bumper">auto <a href="#acfe3cd5d9f59f19ab8a50d0f1f47167c" class="m-doc-self">shift_division</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this value by the given fixed point value, using half precision to try to avoid overflow and shifts for the precision handling.</dd>
            <dt id="a67da4d424dbb0d9d4501d88bf6cc41d6">
              <span class="m-doc-wrap-bumper">auto <a href="#a67da4d424dbb0d9d4501d88bf6cc41d6" class="m-doc-self">safe_division</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this value by the given integer value.</dd>
            <dt id="a2854f9d4b86419d7c6d862ff2f2f87ba">
              <span class="m-doc-wrap-bumper">auto <a href="#a2854f9d4b86419d7c6d862ff2f2f87ba" class="m-doc-self">safe_division</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this value by the given fixed point value, casting them to int64_t to try to avoid overflow.</dd>
            <dt id="ac19b0d46e3f13150fff128af28bb8b6b">
              <span class="m-doc-wrap-bumper">auto <a href="#ac19b0d46e3f13150fff128af28bb8b6b" class="m-doc-self">unsafe_division</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this value by the given integer value.</dd>
            <dt id="a631ef5845bdc1309302c809e6bd9ca1b">
              <span class="m-doc-wrap-bumper">auto <a href="#a631ef5845bdc1309302c809e6bd9ca1b" class="m-doc-self">unsafe_division</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this value by the given fixed point value without trying to avoid overflow.</dd>
            <dt id="ad627b9513b1dc43f0e8afe3b7d201133">
              <span class="m-doc-wrap-bumper">auto <a href="#ad627b9513b1dc43f0e8afe3b7d201133" class="m-doc-self">unsafe_shift_division</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this value by the given integer value.</dd>
            <dt id="af5dde8ca036b86b4dab31f37687cd4cb">
              <span class="m-doc-wrap-bumper">auto <a href="#af5dde8ca036b86b4dab31f37687cd4cb" class="m-doc-self">unsafe_shift_division</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this value by the given fixed point value without trying to avoid overflow, using a left shift instead of a multiplication for the precision handling.</dd>
            <dt id="ab1a836f2529dc5b641dbd4e43e9d2e53">
              <span class="m-doc-wrap-bumper">auto <a href="#ab1a836f2529dc5b641dbd4e43e9d2e53" class="m-doc-self">modulo</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the remainder of the division of this value by the given integer value.</dd>
            <dt id="a0686578f6f6b29667688eea523ea364a">
              <span class="m-doc-wrap-bumper">auto <a href="#a0686578f6f6b29667688eea523ea364a" class="m-doc-self">left_shift</a>(</span><span class="m-doc-wrap">int bits) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns this value shifted to the left by the given bits.</dd>
            <dt id="ae92711484324c5f04b32c6d4dfbaef77">
              <span class="m-doc-wrap-bumper">auto <a href="#ae92711484324c5f04b32c6d4dfbaef77" class="m-doc-self">right_shift</a>(</span><span class="m-doc-wrap">int bits) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns this value shifted to the right by the given bits.</dd>
            <dt id="a12b0e8495d5d4caf389aa74a9895acff">
              <span class="m-doc-wrap-bumper">auto <a href="#a12b0e8495d5d4caf389aa74a9895acff" class="m-doc-self">operator-</a>(</span><span class="m-doc-wrap">) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> that is formed by changing the sign of this one.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a200da736ea3fb4ed5a2d038cadd28ab1" class="m-doc">operator+=</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Adds the given <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> to this one.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a587ff4aaa5451fb8ff630462bfddf599" class="m-doc">operator-=</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Subtracts the given <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> to this one.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a337efa01691bd79c24d588be447fd2ec" class="m-doc">operator*=</a>(</span><span class="m-doc-wrap">int value) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Multiplies this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given factor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a5901409eaa6ddb8f65ed1bab1fcfe057" class="m-doc">operator*=</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Multiplies this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given factor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a86feaa9456982d4c19e05a66a5df3c87" class="m-doc">operator/=</a>(</span><span class="m-doc-wrap">int value) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Divides this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given divisor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a97dc8e0e3966363c4b53336e41eafa7a" class="m-doc">operator/=</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Divides this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given divisor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#acbd50391765534d856fe9666a2d1e053" class="m-doc">operator%=</a>(</span><span class="m-doc-wrap">int other) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Assigns the remainder of the division of this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given divisor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a65763776edbe679e7d8dfb2b77ded3cc" class="m-doc">operator&lt;&lt;=</a>(</span><span class="m-doc-wrap">int bits) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Shifts to the left this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given bits.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a3e0cdedbfbe1ab66a68de19abf24c222" class="m-doc">operator&gt;&gt;=</a>(</span><span class="m-doc-wrap">int bits) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Shifts to the right this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given bits.</dd>
          </dl>
        </section>
        <section id="friends">
          <h2><a href="#friends">Friends</a></h2>
          <dl class="m-doc">
            <dt id="afae8281abebeb139f7bdc09dda7212ac">
              <span class="m-doc-wrap-bumper">auto <a href="#afae8281abebeb139f7bdc09dda7212ac" class="m-doc-self">operator+</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the sum of a and b.</dd>
            <dt id="a012d98c2fe2349d597fcbde33d9a5293">
              <div class="m-doc-template">template&lt;int OtherPrecision&gt;</div>
              <span class="m-doc-wrap-bumper">auto <a href="#a012d98c2fe2349d597fcbde33d9a5293" class="m-doc-self">operator+</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;OtherPrecision&gt; b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;bn::max(Precision, OtherPrecision)&gt; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the sum of a and b.</dd>
            <dt id="aa4059d082d4b5a35069fbb74c734243c">
              <span class="m-doc-wrap-bumper">auto <a href="#aa4059d082d4b5a35069fbb74c734243c" class="m-doc-self">operator-</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the subtraction of a and b.</dd>
            <dt id="ae462bfed9e588414255027b8e47e0d74">
              <div class="m-doc-template">template&lt;int OtherPrecision&gt;</div>
              <span class="m-doc-wrap-bumper">auto <a href="#ae462bfed9e588414255027b8e47e0d74" class="m-doc-self">operator-</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;OtherPrecision&gt; b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;bn::max(Precision, OtherPrecision)&gt; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the subtraction of a and b.</dd>
            <dt id="aedf425e62e9b02874423b067f92a3bc5">
              <span class="m-doc-wrap-bumper">auto <a href="#aedf425e62e9b02874423b067f92a3bc5" class="m-doc-self">operator*</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              int b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a multiplied by b.</dd>
            <dt id="ae44c34deb652a766fddb7bcf54a65026">
              <span class="m-doc-wrap-bumper">auto <a href="#ae44c34deb652a766fddb7bcf54a65026" class="m-doc-self">operator*</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a multiplied by b.</dd>
            <dt id="aa2475e20042e5a03f8e17e3d954d7ad4">
              <div class="m-doc-template">template&lt;int OtherPrecision&gt;</div>
              <span class="m-doc-wrap-bumper">auto <a href="#aa2475e20042e5a03f8e17e3d954d7ad4" class="m-doc-self">operator*</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;OtherPrecision&gt; b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;bn::max(Precision, OtherPrecision)&gt; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a multiplied by b.</dd>
            <dt id="a60afe81e5b6b40ae61d9da71f7755dfb">
              <span class="m-doc-wrap-bumper">auto <a href="#a60afe81e5b6b40ae61d9da71f7755dfb" class="m-doc-self">operator/</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              int b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a divided by b.</dd>
            <dt id="a9fa41c65adbb933f0fa2d0da95dc7ae2">
              <span class="m-doc-wrap-bumper">auto <a href="#a9fa41c65adbb933f0fa2d0da95dc7ae2" class="m-doc-self">operator/</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a divided by b.</dd>
            <dt id="ad52b2011ab6c51b58521c505f0159903">
              <div class="m-doc-template">template&lt;int OtherPrecision&gt;</div>
              <span class="m-doc-wrap-bumper">auto <a href="#ad52b2011ab6c51b58521c505f0159903" class="m-doc-self">operator/</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;OtherPrecision&gt; b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;bn::max(Precision, OtherPrecision)&gt; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a divided by b.</dd>
            <dt id="a28b366de61d6ee60a4dfce9c310ea3d7">
              <span class="m-doc-wrap-bumper">auto <a href="#a28b366de61d6ee60a4dfce9c310ea3d7" class="m-doc-self">operator%</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              int b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the remainder of the division of a by b.</dd>
            <dt id="af6e2ba243bdc119ac8f043b13a566e7d">
              <span class="m-doc-wrap-bumper">auto <a href="#af6e2ba243bdc119ac8f043b13a566e7d" class="m-doc-self">operator&lt;&lt;</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              int b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a shifted to the left by b.</dd>
            <dt id="af4c07e053f6f6d3f31287c2c4d329576">
              <span class="m-doc-wrap-bumper">auto <a href="#af4c07e053f6f6d3f31287c2c4d329576" class="m-doc-self">operator&gt;&gt;</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              int b) -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a shifted to the right by b.</dd>
            <dt id="a40b885fe63178ff9609523d8cefe24fa">
              <span class="m-doc-wrap-bumper">auto <a href="#a40b885fe63178ff9609523d8cefe24fa" class="m-doc-self">operator&lt;=&gt;</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> a,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> b) -&gt; auto <span class="m-label m-flat m-info">defaulted</span> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Default three-way comparison operator.</dd>
          </dl>
        </section>
        <section>
          <h2>Function documentation</h2>
          <section class="m-doc-details" id="ab50c994ef14f1b537cd1f3f22dbb88b6"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper">static <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#ab50c994ef14f1b537cd1f3f22dbb88b6" class="m-doc-self">from_data</a>(</span><span class="m-doc-wrap">int data) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Returns a <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> with the given internal data.</p>
<p>If you want to convert an integer value to <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>, you should use its constructor.</p>
          </div></section>
          <section class="m-doc-details" id="acc68511f7a1cfdc1e679eed89074c9af"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"> bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#acc68511f7a1cfdc1e679eed89074c9af" class="m-doc-self">fixed_t</a>(</span><span class="m-doc-wrap">int value) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Constructor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">value</td>
                  <td>Integer value.</td>
                </tr>
              </tbody>
            </table>
          </div></section>
          <section class="m-doc-details" id="a168c31dad89d76d702341505d7a918e6"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"> bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a168c31dad89d76d702341505d7a918e6" class="m-doc-self">fixed_t</a>(</span><span class="m-doc-wrap">unsigned value) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Constructor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">value</td>
                  <td>Unsigned integer value.</td>
                </tr>
              </tbody>
            </table>
          </div></section>
          <section class="m-doc-details" id="ad0b88c27363175230fb4d79ea90bac45"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"> bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#ad0b88c27363175230fb4d79ea90bac45" class="m-doc-self">fixed_t</a>(</span><span class="m-doc-wrap">float value) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Constructor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">value</td>
                  <td>Single precision floating point value.</td>
                </tr>
              </tbody>
            </table>
          </div></section>
          <section class="m-doc-details" id="a02730b92c60524367d1467efb245199e"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"> bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a02730b92c60524367d1467efb245199e" class="m-doc-self">fixed_t</a>(</span><span class="m-doc-wrap">double value) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Constructor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">value</td>
                  <td>Double precision floating point value.</td>
                </tr>
              </tbody>
            </table>
          </div></section>
          <section class="m-doc-details" id="af6e2d457d8fb0390e1b825776be49021"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
                template&lt;int OtherPrecision&gt;
              </div>
              <span class="m-doc-wrap-bumper"> bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#af6e2d457d8fb0390e1b825776be49021" class="m-doc-self">fixed_t</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;OtherPrecision&gt; other) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Constructor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">other</td>
                  <td>Fixed point value.</td>
                </tr>
              </tbody>
            </table>
          </div></section>
          <section class="m-doc-details" id="a200da736ea3fb4ed5a2d038cadd28ab1"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a200da736ea3fb4ed5a2d038cadd28ab1" class="m-doc-self">operator+=</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Adds the given <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> to this one.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">other</td>
                  <td><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> to add.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a587ff4aaa5451fb8ff630462bfddf599"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a587ff4aaa5451fb8ff630462bfddf599" class="m-doc-self">operator-=</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Subtracts the given <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> to this one.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">other</td>
                  <td><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> to subtract.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a337efa01691bd79c24d588be447fd2ec"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a337efa01691bd79c24d588be447fd2ec" class="m-doc-self">operator*=</a>(</span><span class="m-doc-wrap">int value) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Multiplies this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given factor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">value</td>
                  <td>Integer multiplication factor.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a5901409eaa6ddb8f65ed1bab1fcfe057"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a5901409eaa6ddb8f65ed1bab1fcfe057" class="m-doc-self">operator*=</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Multiplies this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given factor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">other</td>
                  <td>Fixed point multiplication factor.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a86feaa9456982d4c19e05a66a5df3c87"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a86feaa9456982d4c19e05a66a5df3c87" class="m-doc-self">operator/=</a>(</span><span class="m-doc-wrap">int value) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Divides this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given divisor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">value</td>
                  <td>Valid integer divisor (!= 0).</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a97dc8e0e3966363c4b53336e41eafa7a"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a97dc8e0e3966363c4b53336e41eafa7a" class="m-doc-self">operator/=</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> other) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Divides this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given divisor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">other</td>
                  <td>Valid fixed point divisor (!= 0).</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="acbd50391765534d856fe9666a2d1e053"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#acbd50391765534d856fe9666a2d1e053" class="m-doc-self">operator%=</a>(</span><span class="m-doc-wrap">int other) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Assigns the remainder of the division of this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given divisor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">other</td>
                  <td>Valid integer divisor (!= 0).</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a65763776edbe679e7d8dfb2b77ded3cc"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a65763776edbe679e7d8dfb2b77ded3cc" class="m-doc-self">operator&lt;&lt;=</a>(</span><span class="m-doc-wrap">int bits) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Shifts to the left this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given bits.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">bits</td>
                  <td>Number of bits to shift to the left.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a3e0cdedbfbe1ab66a68de19abf24c222"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&amp; bn::<wbr />fixed_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a3e0cdedbfbe1ab66a68de19abf24c222" class="m-doc-self">operator&gt;&gt;=</a>(</span><span class="m-doc-wrap">int bits) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Shifts to the right this <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a> by the given bits.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">bits</td>
                  <td>Number of bits to shift to the right.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
        </section>
      </div>
    </div>
  </div>
</article></main>
<div class="m-doc-search" id="search">
  <a href="#!" onclick="return hideSearch()"></a>
  <div class="m-container">
    <div class="m-row">
      <div class="m-col-m-8 m-push-m-2">
        <div class="m-doc-search-header m-text m-small">
          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
          <div id="search-symbolcount">&hellip;</div>
        </div>
        <div class="m-doc-search-content">
          <form>
            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
          </form>
          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
          <div id="search-help" class="m-text m-dim m-text-center">
            <p class="m-noindent">Search for symbols, directories, files, pages or
            modules. You can omit any prefix from the symbol or file path; adding a
            <code>:</code> or <code>/</code> suffix lists all members of given symbol or
            directory.</p>
            <p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
            / <span class="m-label m-dim">&uarr;</span> to navigate through the list,
            <span class="m-label m-dim">Enter</span> to go.
            <span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
            copy a link to the result using <span class="m-label m-dim">⌘</span>
            <span class="m-label m-dim">L</span> while <span class="m-label m-dim">⌘</span>
            <span class="m-label m-dim">M</span> produces a Markdown link.</p>
          </div>
          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
          <ul id="search-results"></ul>
        </div>
      </div>
    </div>
  </div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
  <div class="m-container">
    <div class="m-row">
      <div class="m-col-l-10 m-push-l-1">
        <p>Butano Docs. Created with <a href="https://doxygen.org/">Doxygen</a> 1.14.0 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
      </div>
    </div>
  </div>
</nav></footer>
</body>
</html>
